package com.xzj.common.okhttp.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.concurrent.TimeUnit;

/**
 * okHttp标签设置
 *
 * @author xiazunjun
 * @date 2023/8/3 9:43
 */
@ConfigurationProperties(prefix = "xzj.http")
@Data
public class OkHttpProps {

    /**
     * 最大连接数
     */
    private int maxIdleConnections = 10;

    /**
     * 存活时间
     */
    private long keepAliveDuration = 2L;

    /**
     * 存活时间单位
     */
    private TimeUnit keepAliveUnit = TimeUnit.MINUTES;

    /**
     * 连接超时时间
     */
    private long timeOut = 2L;

}
